Microsoft DirectX 8.1 (C++)

Step 3. Allocate Buffers

After you set the media types, query the DMO for each stream's buffer requirements. These can change depending on the media type. For each stream, call the IMediaObject::GetInputSizeInfo or IMediaObject::GetOutputSizeInfo method. These methods return three values:

You must allocate sufficient buffers to handle these requirements.

In addition to the size requirements, an input stream might require that each buffer contain only whole samples, or contain exactly one sample, or use a fixed sample size. To determine these requirements, call the IMediaObject::GetInputStreamInfo method.